state

object state : MutableDelegatable, ReadWriteProperty<Any?, String>

Accessors for state. State is action-specific, and only useful when set in one phase and read in another (i.e. post). Delegating from state treats the input as required.

Functions

contains
Link copied to clipboard
open operator fun contains(name: String): Boolean
get
Link copied to clipboard
operator fun get(name: String): String?
Get state name, returning null if it is not set.
getOptional
Link copied to clipboard
open override fun getOptional(name: String): String?
Get state name, returning null if it is not set.
getOrElse
Link copied to clipboard
fun getOrElse(name: String, default: () -> String): String
Get the input passed for name, or default if it was not passed.
getOrPut
Link copied to clipboard
fun getOrPut(name: String, default: () -> String): String
Get name, or set default for name and return it.
getRequired
Link copied to clipboard
open override fun getRequired(name: String): String
Get state name, throwing if it is not set.
getValue
Link copied to clipboard
open operator override fun getValue(thisRef: Any?, property: KProperty<*>): String
A delegate based on the property name, for a required state.
invoke
Link copied to clipboard
operator fun invoke(name: String): ReadOnlyProperty<Any?, String>
Get a delegate for name.
optional
Link copied to clipboard
fun optional(name: String): ReadOnlyProperty<Any?, String?>
Get an optional delegate for name.
optionalWithDefault
Link copied to clipboard
fun optionalWithDefault(default: () -> String): ReadOnlyProperty<Any?, String>
Get an optional delegate with a default value.
fun optionalWithDefault(name: String, default: () -> String): ReadOnlyProperty<Any?, String>
Get an optional delegate with a default value for name.
set
Link copied to clipboard
open operator override fun set(name: String, value: String)
Set state name to value.
setValue
Link copied to clipboard
open operator override fun setValue(thisRef: Any?, property: KProperty<*>, value: String)
A delegate based on the property name, for a required state.

Properties

optional
Link copied to clipboard
val optional: ReadOnlyProperty<Any?, String?>
Get an optional delegate.

Sources

js source
Link copied to clipboard